package cn.yx.common.security.pojo;

import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * <p>Jwt中用到的用户信息存储类</p>
 *
 * @author Wgssmart
 */
@Data
public class JwtClaims {

    private Long id;
    private String username;
    private String account;
    private String phone;
    private String email;
    private String nickname;
    private String avatar;
    private List<String> authorities;
    private Boolean enabled = true;
    private Boolean nonLocked = true;
    private Boolean nonExpired = true;
    /**
     * JwtToken创建时间
     */
    private Date createTime;
    /**
     * JwtToken的失效时间，单位为天
     */
    private Integer tokenExpiration;

    public JwtClaims() {
    }

    public JwtClaims(Long id, String username, String account, String phone, String email,
                     String nickname, String avatar, final List<String> authorities, Date createTime) {
        this.id = id;
        this.username = username;
        this.account = account;
        this.phone = phone;
        this.email = email;
        this.nickname = nickname;
        this.avatar = avatar;
        this.authorities = authorities;
        this.createTime = createTime;
    }

}
